package com.geotmt.billingcenter.modules.cost.service.impl;

import com.geotmt.billingcenter.common.entry.CostRuleHisEntry;
import com.geotmt.billingcenter.modules.cost.mapper.CostRuleHisMapper;
import com.geotmt.billingcenter.modules.cost.service.CostRuleHisService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @Description 成本 ruleHis service
 * @Author      yanghanwei
 * @Mail        yanghanwei@geotmt.com
 * @Date        2019/3/20 11:38
 * @Version     v1
 **/
@Service
@Transactional(rollbackFor = Exception.class)
public class CostRuleHisServiceImpl implements CostRuleHisService {

    @Resource
    private CostRuleHisMapper costRuleHisMapper;

    @Override
    public Integer addRuleHis(CostRuleHisEntry obj) {
        costRuleHisMapper.addRuleHis(obj);
        return obj.getId();
    }
}
